import request from '@/utils/request'
import qs from 'qs'


export function findListByPage(param) {
  return request({
    url: 'api/scriptPack/list/page',
    method: 'get',
    param
  })
}

export function getListByTaskId(taskId) {
  return request({
    url: 'api/scriptPack/list/listByTaskId' + '/' + taskId,
    method: 'get',
    taskId
  })
}

export function findById(id) {
  return request({
    url: 'api/scriptPack/list' + '/' + id,
    method: 'get',
    id
  })
}

export function add(data) {
  return request({
    url: 'api/scriptPack/list',
    method: 'post',
    data
  })
}

export function del(id) {
  return request({
    url: 'api/scriptPack/list'  + '/' + id,
    method: 'delete',
    id
  })
}

export function ignoreById(id) {
  return request({
    url: 'api/scriptPack/list' + '/' + id,
    method: 'put',
    id
  })
}

export function findFailByTaskId(id) {
  return request({
    url: 'api/scriptPack/list/allResult' + '/' + id,
    id
  })
}

export default {
  findListByPage,
  getListByTaskId,
  findById,
  add,
  del,
  ignoreById,
  findFailByTaskId
}
